//导入 polyfill
// import '@babel/polyfill';
import {percent} from './percent';

let btn = document.querySelector('button');

btn.onclick = function(){
    console.log(123);
    if(percent(30)){
        alert('恭喜恭喜, 500w');
    }else{
        alert('再接再厉')
    }
}

//导入 css 资源
import '../css/app.css';
//导入 less 资源
import '../less/index.less';

//eslint 
//环境设置

// window.test = 'test';
//全局变量
// $('body').css('background','#ce6');
// $ = 200;

//ES6 代码转换
// let cls = 'h50510';
// const fn = () => {
//     console.log('fn fn fn');
// }
// console.log(cls, fn);

//polyfill
let result = Promise.resolve('ok');
console.log(result);

//故意报错
result()